/**
 * @author yandou
 * homeEmployees.js
 */

HomeEmployees = function(){
	return {
		init:function(){
			HomeEmployees.datagridInit();
		},
		datagridInit:function(){
			$('#homeEmployees').datagrid({
				url:'/pc/employee/homeEmployees.htm?id='+$("#idHidden").val(),
				fit:true,
				idField:'id',
				striped:true,
				nowrap:true,
				loadMsg:'加载中 ……',
				animate:true,
				pagination:true,
				rownumbers:true,
				fitColumns:true,
				border:true,
				columns:[[
					{field:'employeeCode',title:'员工编码',width:80},
					{field:'employeeName',title:'员工姓名',width:80},
				    {field:'mobile',title:'手机号码',width:80},
				    {field:'delFlag',title:'状态',width:80,formatter: function(value,row,index){
				    	if(value == '0'){
							return '正常';
				    	}else{
				    		return '退订';
				    	}
					}}
				]]
			});
		}
	};
}();

$(function(){
	HomeEmployees.init();
});